#include "il2cpp-config.h"

#if IL2CPP_GC_NULL
struct Il2CppObject;

#include <stdlib.h>
#include "il2cpp-api.h"
#include "GarbageCollector.h"
#include "utils/Memory.h"

void
il2cpp::gc::GarbageCollector::Initialize ()
{
}

void*
il2cpp::gc::GarbageCollector::AllocateFixed (size_t size, void *descr)
{
	return IL2CPP_MALLOC_ZERO (size);
}

void*
il2cpp::gc::GarbageCollector::MakeDescriptorForObject (size_t *bitmap, int numbits)
{
	return NULL;
}

void* il2cpp::gc::GarbageCollector::MakeDescriptorForString()
{
	return NULL;
}

void* il2cpp::gc::GarbageCollector::MakeDescriptorForArray()
{
	return NULL;
}

void il2cpp::gc::GarbageCollector::StopWorld ()
{
	NOT_IMPLEMENTED(il2cpp::gc::GarbageCollector::StopWorld);
}

void il2cpp::gc::GarbageCollector::StartWorld ()
{
	NOT_IMPLEMENTED(il2cpp::gc::GarbageCollector::StartWorld);
}

void
il2cpp::gc::GarbageCollector::RemoveWeakLink (void **link_addr)
{
	*link_addr = NULL;
}

Il2CppObject*
il2cpp::gc::GarbageCollector::GetWeakLink (void **link_addr)
{
	return (Il2CppObject*)*link_addr;
}

void
il2cpp::gc::GarbageCollector::AddWeakLink (void **link_addr, Il2CppObject *obj, bool track)
{
	*link_addr = obj;
}

bool
il2cpp::gc::GarbageCollector::RegisterThread(void *baseptr)
{
	return true;
}

bool
il2cpp::gc::GarbageCollector::UnregisterThread()
{
	return true;
}

void
il2cpp::gc::GarbageCollector::RegisterFinalizerWithCallback (Il2CppObject* obj, void(*callback)(void *, void *))
{
}

void
il2cpp::gc::GarbageCollector::FreeFixed (void* addr)
{
	IL2CPP_FREE (addr);
}

int32_t
il2cpp::gc::GarbageCollector::InvokeFinalizers()
{
	return 0;
}

bool
il2cpp::gc::GarbageCollector::HasPendingFinalizers ()
{
	return false;
}

void
il2cpp::gc::GarbageCollector::Collect (int maxGeneration)
{
}

int32_t
il2cpp::gc::GarbageCollector::CollectALittle ()
{
	return 0;
}

void
il2cpp::gc::GarbageCollector::Enable ()
{
}

void
il2cpp::gc::GarbageCollector::Disable ()
{
}

int64_t
il2cpp::gc::GarbageCollector::GetUsedHeapSize (void)
{
	return 0;
}

int64_t
il2cpp::gc::GarbageCollector::GetAllocatedHeapSize (void)
{
	return 0;
}

int32_t
il2cpp::gc::GarbageCollector::GetMaxGeneration ()
{
	return 0;
}

int32_t
il2cpp::gc::GarbageCollector::GetCollectionCount (int32_t generation)
{
	return 0;
}

void il2cpp::gc::GarbageCollector::ForEachHeapSection (void* user_data, HeapSectionCallback callback)
{
}

size_t il2cpp::gc::GarbageCollector::GetSectionCount ()
{
	return 0;
}

void* il2cpp::gc::GarbageCollector::CallWithAllocLockHeld (GCCallWithAllocLockCallback callback, void* user_data)
{
	return callback(user_data);
}

#endif
